<script type="text/javascript">
<%
        out.print("var idUsuario='" + request.getParameter("idUsuario") + "';\n");
		
%>
</script>
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jquery-ui-1.8.13.custom.min.js"></script>
<script type="text/javascript" src="../js/utils.js"></script>
<script type="text/javascript" src="../js/ajax.js"></script>
<script type="text/javascript" src="../js/jquery.tablePagination.0.4.js"></script>
<script type="text/javascript" src="../js/jquery.tablesorter-update.js"></script>
<script type="text/javascript" src="../js/jquery.dialog.extra.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
        $('body').append(
                $('<div>').attr('id', 'loading').append(
                    $('<img>').attr('src', '../images/ajax_loading.gif').attr('alt', 'Cargando...')
                  ).css({
                      position: 'fixed',
                      display: 'none'
                  })
        );

			$("#divVisitas").show("slow", function(){
				listarVisitasLVS(false,idUsuario);
            });
            
			$("#btnAgregarVisitaLVS").click(function(mievento) {
				mievento.preventDefault();
				abreURL("/jsp/formulario_visita_lvs.jsp?accion=agregar&idUsuario=" + idUsuario, "Agregar Visita", 35, 10, 30, 30);
			});		            

	});

	function editarVisitaLVS(idUsuario,idVisita){
		abreURL("/jsp/formulario_visita_lvs.jsp?accion=editar&idUsuario="+idUsuario+"&idVisita=" + idVisita, "Editar visita", 35, 10, 30, 30);
	}	
</script>
<body> 
<h2 id="titulo">Listado de Visitas</h2>

<div id="divVisitas" style="display:none;">
<input type="hidden" name="idUsuario" id="idUsuario" value=""></input>
<table id="tabla-visitas" summary="LOSO">
	<thead>
		<tr>
			<th scope="col" class="rounded-company"></th>
			<th scope="col" class="rounded">Negocio/Sitio/Area</th>
			<th scope="col" class="rounded">Fecha</th>
			<th align="center" scope="col" class="rounded">Editar</th>
			<th align="center" scope="col" class="rounded-q4">Borrar</th>
		</tr>
	</thead>
	<tfoot>
		<tr>
			<td colspan="4" class="rounded-foot-left"><em></em></td>
			<td class="rounded-foot-right">&nbsp;</td>

		</tr>
	</tfoot>
	<tbody>
	</tbody>
</table>

<div class="clear"></div>
<a id="btnAgregarVisitaLVS" href="#" class="bt_green"><span class="bt_green_lft"></span><strong>Agregar Visita</strong><span class="bt_green_r"></span></a>

</div>
</body> 